<?php
# file that will mark user ready for meeting

# include of site functions
include_once $_SERVER["DOCUMENT_ROOT"].'Meet-n-go/php/includes.php'; 	// contains includes of all files with functions
session_start();					// starts session for current user
c_db_connect(); 					// connect to database

$meet_id = $_GET['meet_id'];
$grp_id = $_GET['grp_id'];
$user_id = $_SESSION['user_id'];

$query = "INSERT INTO prop_participants(USER_ID, MEET_ID) VALUES ($user_id, $meet_id)";
$result = c_db_query($query);
if(!$result) i_set_msg_err('Error in database');

c_db_disconnect(); 					// disconnect from database

# Where to go after processing
$page_id = I_GROUP_OVERVIEW."&grp=$grp_id";

# code that makes sure, this page is being redirected from afterwards
echo '<head><meta http-equiv="refresh" content="0; url=../../../index.php?id=' . $page_id . '" /></head>';


?>